package com.ricchieri.service;

import java.io.Serializable;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.ricchieri.dao.interf.IExpenseDao;
import com.ricchieri.filter.BasicFilter;
import com.ricchieri.model.Expense;
import com.ricchieri.service.interf.IExpenseService;

@Transactional(readOnly = true)
public class ExpenseService implements IExpenseService, Serializable {
	private static final long serialVersionUID = 1328386889241782435L;
	IExpenseDao expenseDao;
	
	@Override
	@Transactional(readOnly = true)
	public List<Expense> getAllExpense() {
		BasicFilter filter = new BasicFilter();
		return expenseDao.getAllExpense(filter);
	}

	public IExpenseDao getExpenseDao() {
		return expenseDao;
	}

	public void setExpenseDao(IExpenseDao expenseDao) {
		this.expenseDao = expenseDao;
	}
}
